package com.naiterui.ehp.bs.b2c.order.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <pre>
 *      订单退款表
 * </pre>
 *
 * @author 王泽浩
 * @date 2019-02-19 10:27
 * @since 1.0.0
 */
@Data
@Builder
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "e_refund_order_log")
public class RefundOrderLog implements java.io.Serializable {

    /**
     * 操作  1：创建退款单
     */
    public static final int OPERATE_CREATE = 1;
    /**
     * 操作   2：修改退款单
     */
    public static final int OPERATE_UPDATE = 2;
    /**
     * 操作  3：提交退款单
     */
    public static final int OPERATE_SUBMIT = 3;
    /**
     * 操作  4：审核退款单
     */
    public static final int OPERATE_AUDIT = 4;
    /**
     * 操作  5：反审核退款单
     */
    public static final int OPERATE_REVERSE_AUDIT = 5;
    /**
     * 操作  6：提交付款申请
     */
    public static final int OPERATE_SUBMIT_PAY = 6;
    /**
     * 操作  7：微信退款成功
     */
    public static final int OPERATE_PAY_SUCCESS = 7;
    /**
     * 操作  8：作废退款单
     */
    public static final int OPERATE_PAY_INVALID = 8;
    /**
     * 操作 9：删除退款单
     */
    public static final int OPERATE_PAY_DELETE = 9;
    /**
     * 操作 10：微信退款失败
     */
    public static final int OPERATE_PAY_FAIL = 10;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 退款单ID
     */
    @Column(name = "refund_order_id")
    private Long refundOrderId;

    /**
     * 退款单号
     */
    @Column(name = "refund_order_sn")
    private String refundOrderSn;

    /**
     * 操作  1：创建退款单 2：修改退款单 3：提交退款单 4：审核退款单 5：反审核退款单 6：提交付款申请 7：微信退款成功 8：作废退款单 9：删除退款单
     */
    @Column(name = "operate")
    private Integer operate;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;

}